package clases;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;

public class IGerente extends javax.swing.JPanel {

    //Connection conector;
    Statement stmt;
    Ventana principal;
    PanelHistorialCredito phCredito = new PanelHistorialCredito();
    PanelPagosExtraEmpleados ppEmpleados = new PanelPagosExtraEmpleados();
    PanelPedidosPendientes ppPendientes = new PanelPedidosPendientes();

    
    public IGerente(Ventana v) {
        initComponents();
        principal=v;
       // ST = stmt;
        // principal = aThis;
        this.setBounds(0, 0, 1000, 700);

        this.setVisible(true);
        phCredito.setVisible(true);
        ppEmpleados.setVisible(true);
        ppPendientes.setVisible(true);

        this.add(phCredito);
        this.add(ppEmpleados);
        this.add(ppPendientes);

    }

    IGerente(Connection conector) {
        initComponents();
      //  this.conector = conector;

       // ST = stmt;
        // principal = aThis;
        this.setBounds(0, 0, 1000, 700);
         
        this.add(phCredito);
        this.add(ppEmpleados);
        this.add(ppPendientes);
        getInPanels();
    }

    public void getOutPanels() {

        this.setVisible(false);
        phCredito.setVisible(false);
        ppEmpleados.setVisible(false);
        ppPendientes.setVisible(false);
    }

    public void getInPanels() {

        this.setVisible(true);
        phCredito.setVisible(true);
        ppEmpleados.setVisible(true);
        ppPendientes.setVisible(true);

    }

    public void conectarPaneles(Statement stmt) {

    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();

        setBackground(new java.awt.Color(170, 198, 210));

        jLabel1.setFont(new java.awt.Font("Broadway", 1, 18)); // NOI18N
        jLabel1.setText("Compu System/");

        jLabel2.setFont(new java.awt.Font("Lucida Bright", 1, 14)); // NOI18N
        jLabel2.setText("Gerencia");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(279, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel2))
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(343, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    public void setStatement(Statement st) {
        stmt = st;
        phCredito.setST(st);
        ppEmpleados.setST(st);
        ppPendientes.setST(st);
    }


    public static void main(String args[]) {
        /*
         JFrame vent = new JFrame();
         vent.setSize(700,600);
         IGerente p = new IGerente();
         p.setBounds(0,0,650,650);
         vent.add(p);
         vent.setVisible(true);
         */

    }


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    // End of variables declaration//GEN-END:variables
}
